The Tab View Component > FTabView.addItem() |
FTabView.addItem()
Availability
Flash Player 6.
Usage
myTab_tbv.addItem(label [,data])
Parameters
label A string specifying the label of the new tab.
data An optional Object which will be associated with the tab.
Returns
Nothing.
Description
Adds a tab at the end of the tab view. The component will automatically redraw to show the newly added tab. If a string is passed in for the second parameter a user defined object will automatically be created with the string as the label.
Example
The tab_sortItemsBy.fla example file contains an example of using this method.
The following code adds a tab named Tab1 to the component, and then traces its label.
myTab_tbv.addItem( "Tab1" ); trace( "Tab 1: " + myTab_tbv.getItemAt( 0 ).label ); //traces "Tab 1: Tab1"
See also